home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13755 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.0 KB  |  65 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.eds.co.nz!usenet
  3. From: Ross Smith <ross.smith@nz.eds.com>
  4. Subject: Re: Coding Standards
  5. Content-Type: text/plain; charset=us-ascii
  6. Sender: usenet@nz.eds.com (Usenet News Admin)
  7. Content-Transfer-Encoding: 7bit
  8. Organization: EDS (New Zealand) Ltd
  9. Message-ID: <3158C3C6.9D8@nz.eds.com>
  10. References: <4hj8ek$elu@sam.inforamp.net>
  11.      <4hktar$5o2@galaxy.ucr.edu>        <4hmqol$97j@abacus.abasoft.co.uk>
  12.      <4hsg8r$pmm@sam.inforamp.net>        <4i9o6j$p4l@daisy.pgh.wec.com>
  13.      <4idskb$pc1@sam.inforamp.net> <CBARBER.96Mar18104644@figaro.bbn.com>
  14.      <4io1a4$n9v@sam.inforamp.net> <31501BEF.ABD@acf4.nyu.edu> <4j87rq$q74@sam.inforamp.net>
  15. X-Mailer: Mozilla 2.01 (WinNT; I)
  16. Mime-Version: 1.0
  17. X-Nntp-Posting-Host: crazy-harry.lab.nz.eds.com
  18. Date: Wed, 27 Mar 1996 04:27:50 GMT
  19.  
  20. Randy Charles Morin wrote:
  21. > In article <31501BEF.ABD@acf4.nyu.edu>,
  22. >    Shalom Reich <sqr1874@acf4.nyu.edu> wrote:
  23. > >I've lost the original post, which asked about file name suffixes.
  24. > >I understand that the new C++ Draft Standard will allow files with
  25. > >NO suffix!  Indeed, I hear that some standard header files will come
  26. > >without suffixes in order to avoid name collisions with existing
  27. > >header files.
  28. > I was hoping they would adopt the ".hpp" header extension for classes
  29. > to avoid such collisions.
  30.  
  31. Slight misunderstanding here: The C++DS has nothing to say about *file*
  32. names. It specifies only the names you put in #include statements. The
  33. compiler (more precisely, the preprocessor) is free to translate between
  34. the specified header name (following the standard) and the actual file name
  35. (following, presumably, whatever naming conventions are in common use on
  36. the OS) in whatever way it considers reasonable.
  37.  
  38. Specifying "#include <string>" might cause a file called "string" to be
  39. included, or it might cause a file called "string.h" or "string.hpp" or
  40. "string.hxx" or "string.H" or "string.h++" or ... to be included, or it
  41. might cause the compiler to behave as though the appropriate inclusion
  42. had happened, without any actual include file being present (i.e. the
  43. relevant code is hardcoded into the preprocessor, or present in some
  44. form other than a header file).
  45.  
  46. In practice, I suspect most compilers will continue to use the ".h" or
  47. ".hpp" suffix, and attach the suffix automatically when it sees an include
  48. directive without one.
  49.  
  50. C++DS>  A preprocessing directive of the form
  51. C++DS>          # include <h-char-sequence> new-line
  52. C++DS>  searches  a  sequence  of  implementation-defined  places for a header
  53. C++DS>  identified uniquely by the specified sequence  between  the  <  and  >
  54. C++DS>  delimiters, and causes the replacement of that directive by the entire
  55. C++DS>  contents of the header.  How the places are specified  or  the  header
  56. C++DS>  identified is implementation-defined.
  57.  
  58. -- 
  59. Ross Smith ........................................ Wellington, New Zealand
  60. Work: <mailto:ross.smith@nz.eds.com> ... Home: <mailto:alien@netlink.co.nz>
  61.       "This document is a working draft and is known to be incorect,
  62.       incomplet, and incoNsistent."   -- from the C++ Draft Standard
  63.